from typing import Optional


def my_func(a: int, b: str, c: Optional[int] = None) -> str:
    assert isinstance(a, int)
    assert isinstance(b, str)

    if c is not None:
        assert isinstance(c, int)
        xrow = c
    else:
        xrow = 1

    xresult = ''
    for i in range(xrow):
        for j in range(a):
            xresult += b
        xresult += '\n'

    return xresult


if '__main__' == __name__:
    print(my_func(5, '**', 3))
    print(my_func(2, 'I love Wu Xiaorui! '))
    # print(my_func('5', '**', 3))  # AssertionError
